<html>
<head>
    <link rel="stylesheet" href="/assets/css/metro-bootstrap.min.css">
    <link rel="stylesheet" href="/assets/css/metro-bootstrap-responsive.min.css">
    <link rel="stylesheet" href="/assets/css/iconFont.min.css">
    <script src="/assets/js/jquery/jquery.min.js"></script>
    <script src="/assets/js/jquery/jquery.widget.min.js"></script>
    <script src="/assets/js/metro.min.js"></script>
    <style>

    div.scroll
    {
    width:1350px;
    height:300px;
    overflow:scroll;
    }
    </style>
</head>
<body class="metro">
<div class="container">

    <nav class="navigation-bar">
        <nav class="navigation-bar-content">
            <div class="element on-left-more">
                <a class="dropdown-toggle" href="#"><span class="icon-laptop"></span>&nbsp;&nbsp;Saral</a>
                <ul class="dropdown-menu place-left" data-role="dropdown">
                    <li><a href="/index.php/devices/add">Add device</a></li>
                    <li><a href="add">Add allocations</a></li>
                    <li><a href="#">Reports</a></li>
                </ul>
            </div>

            <span class="element-divider"></span>

            <div class="element place-right on-left-more">
                <a class="dropdown-toggle" href="#">
                    <span class="icon-user on-left-more"></span>vivekpat@thoughtworks.com
                </a>
                <ul class="dropdown-menu place-right" data-role="dropdown">
                    <li><a href="/index.php/usercontroller/viewdashboard">My dashboard</a></li>
                    <li><a href="#">My profile</a></li>
                    <li><a href="/index.php/signout">Sign out</a></li>
                </ul>
            </div>
            <span class="element-divider place-right"></span>

            <div class="element place-right input-element">
                <form>
                    <div class="input-control text">
                        <input type="text" placeholder="Search...">
                        <button class="btn-search"></button>
                    </div>
                </form>
            </div>

        </nav>
    </nav>

    <div class="grid show-grid">
        <div class="row">
            <div class="span12">
                <h1>Allocations</h1>
                <div class="row">&nbsp;</div>
                <h4>Filter using following options</h4>
                <div class="row">&nbsp;</div>
                <fieldset>
                    <form action="/index.php/allocations/view" method="post">
                        <div class="span3">
                            <div class="input-control select">
                                <select name="region">
                                    <option>Select region</option>
                                    <option value="Australia">Australia</option>
                                    <option value="China">China</option>
                                    <option value="India">India</option>
                                </select>
                            </div>
                        </div>
                        <div class="span3">
                            <div class="input-control select">
                                <select name="location">
                                    <option>Select location</option>
                                    <option value="Melbourne">Melbourne</option>
                                    <option value="Pune">Pune</option>
                                    <option value="Beijing">Beijing</option>
                                </select>
                            </div>
                        </div>

                        <div class="span3">

                            <div class="input-control text" id="fromdatepicker">
                                <input type="text" name="allocation_date" placeholder="Allocation Date">
                                <button class="btn-date"></button>
                            </div>

                            <script>
                                $("#fromdatepicker").datepicker();
                            </script>

                        </div>
                        <div class="span3">
                            <div class="input-control text" id="todatepicker">
                                <input type="text">
                                <button class="btn-date"></button>
                            </div>

                            <script>
                                $("#todatepicker").datepicker();
                            </script>

                        </div>
                        <input type="submit"value="Filter"/>
                    </form>
                </fieldset>


                <div class="row">&nbsp;</div>
                <div class="row">
                    <div class="span6"><h4>Details about Allocations</h4><h4>Count: <?php echo $count?></h4></div>
                    <div class="span6 text-right"><a href="#"><img src="/assets/images/excel.png" width="36px" height="36px"> </a></div>
                </div>

                <div class="row">&nbsp;</div>
                <div class="scroll">
                <table class="table hovered">
                    <thead>
                    <tr>
                        <th class="text-left">Serial ID</th>
                        <th class="text-left">ID</th>
                        <th class="text-left">Employee ID</th>
                        <th class="text-left">Allocation Date</th>
                        <th class="text-left">Allocation Status</th>
                        <th class="text-left">Region</th>
                        <th class="text-left">Location</th>
 
                    </tr>
                    </thead>

                    <tbody>
                    <?php foreach ($allocations as $allocation): ?>
                    <tr>
                        <td class="right"><?php echo $allocation['serial_id'] ?></td>
                        <td class="right"><?php echo $allocation['id'] ?></td>
                        <td class="right"><?php echo $allocation['employee_id'] ?></td>
                        <td class="right"><?php echo $allocation['allocation_date'] ?></td>
                        <td class="right"><?php echo $allocation['allocation_status'] ?></td>
                        <td class="right"><?php echo $allocation['region'] ?></td>
                        <td class="right"><?php echo $allocation['location'] ?></td>
                        <td>
                            <div class="span2 text-right">
                        	<form action="edit" method="post">
							<input type="hidden" name="id" value="<?php echo $allocation['id']?>" />
							<i class="icon-pencil on-left"></i><input type="submit"value="Edit"/>
							</form>
                        </div>
                            
                        </td>
                        <td>
                            <div class="span1 text-right">
                            <form action="viewind" method="post">
                            <input type="hidden" name="d_id" value="<?php echo $allocation['id']?>" />
                            <input type="submit"value="View"/>
                            </form>
                        </div>
                            
                        </td>
                    </tr>
                    <?php endforeach ?>
                    </tbody>

                    <tfoot></tfoot>
                </table>
            </div>

            </div>
        </div>


    </div>

</div>

</body>
</html>